package demo1;

import java.util.Arrays;

public class Test3 {

    /**
     * 用for循环进行拷贝
     * @param args
     */
    public static void main(String[] args) {
        int[] array = {1,2,3,4,5};
        int[] copy = new int[array.length];
        for (int i = 0; i < array.length; i++) {
            copy[i] = array[i];
        }
        System.out.println(Arrays.toString(array));
        System.out.println(Arrays.toString(copy));
    }

}
